Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for BYOVPC for GCP #213

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Add Support for BYOVPC for GCP #213

wants to merge 12 commits into from

Conversation

gene-redpanda
Copy link
Member

@gene-redpanda gene-redpanda commented Mar 13, 2025

Contains a known issue regarding deprecated fields for serverless #214

Adds support for GCP BYOVPC. Validated cluster creation and destruction. Also has a supporting module which is going through a cleanup round.

I apologize in advance for what you're going to see in this commit.

So basically the terraform acceptance testing framework for the terraform plugin framework doesn't support the use of terraform modules. Yes, you read that right. In this context "doesn't support" means "will not delete any of the resources created by a module if the test fails". The module in question creates hundreds of resources so this isn't an ideal outcome.

As a result I split the module out to a separate file and imported the arns of the essential created resources. This isn't ideal and isn't how end users should do this. I'm not sure how to square the circle on this one.
@gene-redpanda gene-redpanda changed the title Byovpc gcp Add Support for BYOVPC for GCP Mar 24, 2025
Also adds an email validator as that seemed sensible.

I moved the aws elements of the cmr generate function into helper functions to improve readability of that enormous switch.
@gene-redpanda gene-redpanda marked this pull request as ready for review March 25, 2025 01:19
In some circumstances the API can return permission denied rather than not found for a resource that has been deleted. We handle it as a not found because
* the user will be failing auth at a much earlier stage in the provider flow if their token is actually invalid
* if we don't handle it as a not found we will incorrectly error on deleted resources
I added that tag when I was doing byoc testing work and didn't want to also hit the standard stuff when repeating the tests frequently. This is no longer necessary and is occasionally causing test duplication so away it goes!
It looks like there is a large rework for serverless required which is out of scope for this PR. It should still work, I will come back to it in a follow on PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants